home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 051-075 / disk_065 / menubuilder / documentation < prev    next >
Text File  |  1992-05-06  |  5KB  |  142 lines

  1.  
  2.                 Custom Services MenuBuilder
  3.  
  4.                    Version 1.0 By A. F. Preston
  5.  
  6.  
  7. IMPORTANT NOTE:
  8.  
  9.   This Software is Copyrighted 1987 by Custom Services
  10.   All rights to this and the generated data are the property
  11.   of Custom Services and may not be used for Commercial purposes
  12.   without the express written consent of Custom Services.
  13.   This program is made available as "No Frills Software" to be
  14.   distributed with all the copyright notices intact.  Custom Services
  15.   Has many useful tools to aid in program developement.
  16.   This program along with the complete documentation is available by
  17.   sending $5.00 to:
  18.  
  19.          Custom Services
  20.          P. O. Box 254
  21.          Moorestown, NJ., 08057
  22.  
  23.   By Sending a disk with your PD software or shareware you will recieve a
  24.   $2.00 discount.
  25.  
  26. General Description:
  27.  
  28.   There is a difficulty in building menus, this program will automate
  29.   the process.  This program will take a simple text file  and generate
  30.   a C source file with all the needed structures for producing
  31.   an AMIGA Menu.
  32.  
  33. Input:
  34.  
  35.   The Input to this program is a simple set of three commands.  The commands
  36.   are:
  37.  
  38.   MENU,Name
  39.   ITEM,Name,[Select],[Command]
  40.   SUBI,Name,[Select],[Command]
  41.  
  42.   Position and Flags will be set to a reasonable default.  The User
  43.   may Edit the resulting source to modify the options.
  44.  
  45.   Name is the name of the Menu, item or Sub item.
  46.  
  47.   Select is an optional item which will display when the item is
  48.   in position to be selected.  The V1.2 Intuition will overlay the
  49.   text in Select field on top of the text in the Name field.  
  50.   
  51.   Command is the Character to use for selection of the menu item with
  52.   the AMIGA key.  No  check will be made to see that characters are not
  53.   used more than once.
  54.  
  55.   The positioning of a menu will be automatically calculated based on the
  56.   length of the strings used in the menu.  The widest string will be used
  57.   to base the width.  Most of this processing is contained in the routine
  58.   Do_Output, Change it's parameters as needed.  Sub Menus will overlap the
  59.   Menu Item by about 40 %.  
  60.  
  61. Output:
  62.   The Output will be generated from the text in the file.  A  Standard C
  63.   source file compatible with Lattice C and V1.2 Intuition will be
  64.   generated. The struct's Menu, MenuItem, and IntuiText will be generated
  65.   as needed to define the Menu's based on the input file.
  66.  
  67. Process:
  68.  
  69.   The text file is read line by line and the data saved in the regular
  70.   Intuition structures.  After all data is read and no errors have
  71.   been found the program will output to STDOUT all the text needed to
  72.   generate the menu described. If sub menus are specified the position
  73.   of the sub menu will be about 40 % overlapped with the linked menu item.
  74.  
  75. Usage:
  76.  
  77.   Build your file of the appropriate menu description statements. Run the
  78.   program redirecting the output to a file.  Compile the file.  Link you
  79.   menu with the driver and processing programs and go!
  80.  
  81.   You will need to include the statement:
  82.  
  83.   extern struct Menu *MyMenu;
  84.  
  85.   In your source program and call:
  86.  
  87.   SetMenuStrip(window ptr,MyMenu);
  88.  
  89.   Also, before you close your window you must call:
  90.  
  91.   ClearMenuStrip(window ptr);
  92.  
  93.   or risk a spectacular crash.  I don't know why Intuition doesn't
  94.   do this automatically as normal exit time cleanup!
  95.  
  96. Examples:
  97.  
  98.   A program was published in AMIGAWORLD which contained two source files:
  99.   The first was a driver program, the second a Menu.  This program allowed
  100.   users to test their menus, it is included here as a driver.  The results
  101.   from the Menubuilder will be a file which is compatible with "MENU".  A
  102.   script file BUILD_IT will build the MENUBUILDER, create your menu, compile
  103.   the result, link the driver, and execute your test.  The test file is
  104.   a sample menu with sub menus.  The resulting program is called Process.
  105.  
  106.   Process is a simple menu handler.  You have to add your own code to do
  107.   the work required by your task.  MENU will open a screen and window and
  108.   pass menu items to Process.  If the -d option is used, MENU will display
  109.   the menu items and not pass the data on to Process.  A program would have
  110.  
  111.   1) Menu - Screen, Window, Argument processing, and Menu handling
  112.  
  113.   2) Process - your code to do whatever the program is supposed to do.
  114.  
  115.   3) text.c  - the menu file generated by MENUBUILDER
  116.  
  117.   The file text.c is generated by the command:
  118.  
  119.    MENUBUILDER >text.c test
  120.  
  121.   This must be compiled and the three files linked.  See Build_It to
  122.   see how this is done.
  123.  
  124. Known Features(Bugs) and improvements:
  125.  
  126.   I am currently using this program as supplied.  I do find that command
  127.   sequences require a slightly larger width and am working on corrections
  128.   for that code.  The code generated by MENUBUILDER will compile without
  129.   warnings and appears to be correct.  It would be nice if the generated
  130.   code would be checked for menu's that are too large for your screen.
  131.   Range checks for pixel positions outside the 640 X 200 Hi Res screen would
  132.   save time.  I am looking into range checking.
  133.  
  134. Warranty:
  135.  
  136.   30 seconds or 30 feet whichever comes first!
  137.  
  138.   Seriously, I would like to know if you find bugs in this or any of my
  139.   programs.  I will try and fix the bug and return you a good version of
  140.   the program.  All I ask is that you send a disk with information on
  141.   what the problem is.  Please include return postage with your disk!
  142.